<template>
  <div class="menu">
    <van-search v-model="value" placeholder="请输入搜索关键词" shape="round" />
    <div class="menu-box">
      <div class="menu-list">
        <van-sidebar v-model="activeKey">
          <van-sidebar-item
            :title="item.title"
            v-for="(item, index) in menuListData"
            :key="index"
          />
          <van-sidebar-item title="标签名称" />
          <van-sidebar-item title="标签名称" />
        </van-sidebar>
      </div>
      <div class="menu-product">
        <Product></Product>
        <div class="greenstitle">
          <div class="gorice">下饭菜 &gt;</div>
          <div class="imgs">
            <img
              src="http://tx1.douguo.net/upload/photo/4/1/0/70_u88519432918359133730.jpeg"
              alt=""
            />
          </div>
        </div>
        <div class="content">
          <div class="rowone">
            <div class="dishname">麻婆豆腐</div>
            <div class="dishname">麻婆豆腐</div>
            <div class="dishname">麻婆豆腐</div>
          </div>
          <div class="rowone">
            <div class="dishname">麻婆豆腐</div>
            <div class="dishname">麻婆豆腐</div>
            <div class="dishname">麻婆豆腐</div>
          </div>
          <div class="rowone">
            <div class="dishname">麻婆豆腐</div>
            <div class="dishname">麻婆豆腐</div>
            <div class="dishname">麻婆豆腐</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
 import product from "../components/Product.vue" 
export default {
  name: "Menu",
  comments:{
    product
  },
  data() {
    return {

      //菜单列表激活的下标
      activeKey: 0,
      //菜单列表数据
      menuListData: [
        {
          title: "热门",
        },
        {
          title: "蔬菜",
        },
        {
          title: "肉类大全",
        },
        {
          title: "主食",
        },
        {
          title: "菜式菜系",
        },
        {
          title: "水产海鲜",
        },
        {
          title: "烘焙",
        },
        {
          title: "蛋奶豆制品",
        },
        {
          title: "食疗养生",
        },
        {
          title: "酒水饮品",
        },
        {
          title: "厨具",
        },
        {
          title: "中小学生",
        },
        {
          title: "母婴",
        },
        {
          title: "烹饪方法",
        },
        {
          title: "面食杂粮",
        },
        {
          title: "口味",
        },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.menu {
  position: flex;
  top: 0;
  right: 0;
  bottom: 50px;
  left: 0;
  .menu-box {
    height: calc(100% - 50px);
    display: flex;
    .menu-list {
      width: 80px;
      overflow-y: auto;
    }
    .menu-product {
      width: calc(100% - 80px);
      background-color: rgb(216, 75, 75);
      overflow-y: auto;
      padding: 8px 15px;
      .greenstitle {
        display: flex;

        align-items: center;
        justify-content: space-around;
        border-radius: 3px;
        height: 60px;
        background-color: #fff7f7;
        .gorice {
          margin-left: 30px;
          font-size: large;
          font-weight: 900;
          color: #c87233;
        }
        .imgs {
          // width:40px ;
          // height: 40px ;
          overflow: hidden;
          box-sizing: border-box;
          img {
            width: 48px;
            height: 48px;
            border-radius: 50%;

            object-fit: cover;
            display: block;
          }
        }
      }
      .content {
        padding-top: 10px;
        padding-bottom: 3px;
        // display: flex;
        // align-items: center;
        // justify-content: space-between;
        .rowone {
          display: flex;
          align-content: flex-start;
          justify-content: space-between;
          flex-wrap: wrap;
          .dishname {
            border-radius: 3px;
            font-size: medium;
            font-weight: 800;
            color: #9e9e9e;
            width: 30%;
            height: 30px;
            line-height: 30px;
            margin: 5px 0;
            text-align: center;
            background-color: #ffffff;
          }
        }
      }
    }
    .van-sidebar-item--select::before {
      background-color: #ffc533;
    }
  }
}
</style>
